<script setup lang="ts">
import { onLoad } from "@dcloudio/uni-app";
import { ref, watch } from "vue";
import uniqBy from "lodash/uniqBy";
import goodsIcon from "./goodsIcon.vue";
import { onReady } from "@dcloudio/uni-app";
import { router } from "@/utils/tools";
import { onReachBottom } from "@dcloudio/uni-app";
import { apiMyList } from "@/apis/my";
const props = defineProps({
  listData: {
    type: Array,
    default: [],
  },
});
onLoad((options: any) => {});
onReady(() => {});
onReachBottom((e: any) => {});
</script>
<template>
    <view> 
      <view class="product-wrap">
        <view class="product-item" v-for="(item,index) in 5" :key="index">
          <view class="tags">包邮</view>
          <view class="product-img">
            <view class="renz">
              <image src="@/static/images/yirenzheng.png" />
            </view>
            <view class="play">
              <image src="@/static/images/playvideo.png" />
            </view>
            <image src="@/static/images/listimgs.png" />
          </view>
          <view class="product-info">
            <view class="product-title">案头玄关清供石传统</view>
            <view class="product-mey">
              <view class="product-money">
                <view class="product-unit">￥</view>
                <view class="product-num">12990</view>
              </view>
            </view>
            <view class="product-user">
              <view class="user-authr">
                <image src="@/static/images/listimgs.png" />
              </view>
              <view class="user-name">西域奇石</view>
            </view>
          </view>
        </view>
      </view>
    </view>
</template>
<style scoped lang="scss">
.product-wrap{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  .product-item{
    background: #FFFFFF;
    box-shadow: 0rpx 5rpx 20rpx 0rpx rgba(211,211,211,0.2);
    border-radius: 16rpx;
    width: 48%;
    margin-right: 2%;
    margin-bottom: 24rpx;
    position: relative;
    .tags{
      position: absolute;
      left: 0;
      top: 0;
      width: 100rpx;
      height: 40rpx;
      background: #F52121;
      color: #fff;
      font-size: 24rpx;
      text-align: center;
      line-height: 40rpx;
      border-top-left-radius: 16rpx;
      border-bottom-right-radius: 16rpx;
    }
    .product-img{
      width: 100%;
      height: 335rpx;
      position: relative;
      .renz{
        position: absolute;
        right: 20rpx;
        bottom: 25rpx;
        width: 88rpx;
        height: 79rpx;
        image{
          width: 100%;
          height: 100%;
        }
      }
      .play{
        position: absolute;
        left: 20rpx;
        bottom: 27rpx;
        width: 28rpx;
        height: 28rpx;
        image{
          width: 100%;
          height: 100%;
        }
      }
      image{
        width: 100%;
        height: 100%;
      }
    }
    .product-info{
      margin: 24rpx 20rpx 32rpx 20rpx;
      .product-title{
        font-weight: bold;
        font-size: 28rpx;
        color: #212121;
      }
      .product-money{
        display: flex;
        align-items: baseline;
        .product-unit{
          color: #F52121;
          font-size: 20rpx;
          font-weight: bold;
        }
        .product-num{
          color: #F52121;
          font-size: 32rpx;
          font-weight: bold;
        }
      }
      .originalprice{
        font-weight: normal;
        font-size: 24rpx;
        color: #999999;
        text-decoration: line-through;
        margin-left: 16rpx;
      }
    }
  }
  .product-item:nth-of-type(2n){
    margin-right: 0;
  }
}
.product-mey{
  display: flex;
  align-items: center;
  margin-top: 20rpx;
}
.product-user{
  display: flex;
  align-items: center;
  margin-top: 24rpx;
  .user-authr{
    width: 44rpx;
    height: 44rpx;
    border: 2rpx solid #E4E4E4;
    border-radius: 50%;
    // overflow: hidden;
    image{
      width: 100%;
      height: 100%;
      border-radius: 50%;
      vertical-align: top;
    }
  }
  .user-name{
    font-weight: 400;
    font-size: 28rpx;
    color: #000000;
    margin-left: 14rpx;
  }
}
</style>